#ifndef __TYPES_H
#define __TYPES_H

#ifndef _WINDOWS_     // 32 bits
#ifndef __WINDOWS_H   // 16 bits

typedef unsigned char  BYTE;
typedef unsigned short WORD;
typedef unsigned long  DWORD;
typedef unsigned long  LONG;
typedef long HANDLE;

typedef int BOOL;   // Windows.h does not like enum { FALSE, TRUE }
#define FALSE 0
#define TRUE  1

typedef void * LPVOID;
typedef char * LPSTR;
typedef BYTE * LPBYTE;

#define LOBYTE(w)           ((BYTE)(w))
#define HIBYTE(w)           ((BYTE)(((WORD)(w) >> 8) & 0xFF))

#define LOWORD(l) ( ( WORD ) ( l ) )
#define HIWORD(l) ( ( WORD ) ( ( DWORD ) ( l ) >> 16 ) )

#endif
#endif
#endif
